function chat_tips_show() {
    //setTimeout(show_later,500);
    //$("#chat-tips").css({display:"block"});
    fadeIn("chat-tips", 5)
}
function show_later() {
    $("#chat-tips").css({display: "block"});
}
function chat_tips_hide() {
    $("#chat-tips").css({display: "none"});

}


function setOpacity(elem, level) {
    if (elem.filters)
        elem.style.filter = "alpha(opacity=" + level + ")";
    else
        elem.style.opacity = level / 100;
}

function fadeIn(elem, speed) {
    var e = typeof elem == 'string' ? document.getElementById(elem) : elem;
    setOpacity(e, 0);
    e.style.display = "block";
    var i = 0;

    function dg() {
        if (i <= 100) {
            (function () {
                var pos = i;
                setTimeout(function () {
                    setOpacity(e, pos);
                }, (pos + 1) * speed);
            })();
            i += 1;
            dg();
        }
    }
    dg();
}
$("#g_topicon").on("click", function () {

    $("html,body").animate({scrollTop: 0}, 500);
})
// window.onload = function () {
//     if (g_isMobile()) return;
//     setTimeout(function () {
//         level();
//     }, 20000);
// };

function level() {
    window.open('http://livechat.xdcplus.com/chat.php?a=ec399', '', 'width=610,height=760,left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes');
}




